home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 August (Alt) / CHIP 2005-08.1.iso / program / torrent / tracker.exe / MyMinionSocket.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-05-05  |  1.4 KB  |  54 lines

  1. /**
  2.  **    File ......... MyMinionSocket.h
  3.  **    Published ....  2004-04-20
  4. **/
  5. /*
  6. Copyright (C) 2004  grymse@alhem.net
  7.  
  8. This program is free software; you can redistribute it and/or
  9. modify it under the terms of the GNU General Public License
  10. as published by the Free Software Foundation; either version 2
  11. of the License, or (at your option) any later version.
  12.  
  13. This program is distributed in the hope that it will be useful,
  14. but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. GNU General Public License for more details.
  17.  
  18. You should have received a copy of the GNU General Public License
  19. along with this program; if not, write to the Free Software
  20. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  21. */
  22. #ifndef _MYMINIONSOCKET_H
  23. #define _MYMINIONSOCKET_H
  24.  
  25. #include <MinionSocket.h>
  26. #include <NullCrypt.h>
  27. #include "key.h"
  28.  
  29.  
  30. class MyMinionSocket : public MinionSocket
  31. {
  32. public:
  33.     MyMinionSocket(SocketHandler& );
  34.     MyMinionSocket(SocketHandler& ,const std::string& ,ipaddr_t,port_t);
  35.     ~MyMinionSocket();
  36.  
  37.     ICrypt *AllocateCrypt() { return new NullCrypt; }
  38.     int GetMaxConnections() { return 3; }
  39.     unsigned char *GetKey_m2minion() { return k1; }
  40.  
  41.     void Notify(const std::string& str) { 
  42. //        printf("%s\n",str.c_str()); 
  43.     }
  44.  
  45.     void OnConnect();
  46.     bool OnVerifiedLine(const std::string& cmd,Parse& pa);
  47.  
  48. };
  49.  
  50.  
  51.  
  52.  
  53. #endif // _MYMINIONSOCKET_H
  54.